import api from './api'

// 登录
export const login = (loginData) => {
  return api.post('/auth/login', loginData)
}

// 注册
export const register = (registerData) => {
  return api.post('/auth/register', registerData)
}

// 获取当前用户信息
export const getCurrentUser = () => {
  return api.get('/auth/me')
}

// 登出
export const logout = () => {
  return api.post('/auth/logout')
}